<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>openid.extensions.sreg.SRegResponse</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">

<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="openid-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://openidenabled.com/python-openid/">Python-OpenID</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <font size="-1"><b class="breadcrumbs">
        <a href="openid-module.html">Package&nbsp;openid</a> ::
        <a href="openid.extensions-module.html">Package&nbsp;extensions</a> ::
        <a href="openid.extensions.sreg-module.html">Module&nbsp;sreg</a> ::
        Class&nbsp;SRegResponse
      </b></font></br>
    </td>
    <td><table cellpadding="0" cellspacing="0">
      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="openid.extensions.sreg.SRegResponse-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
    </table></td>
</tr></table>

<!-- =========== START OF CLASS DESCRIPTION =========== -->
<h2 class="class">Type SRegResponse</h2>

<pre class="base-tree">
<a href="__builtin__.object-class.html"><code>object</code></a> --+    
         |    
 <a href="openid.extension.Extension-class.html"><code>Extension</code></a> --+
             |
            <b>SRegResponse</b>
</pre><br />

<hr/>

Represents the data returned in a simple registration response inside 
of an OpenID <code>id_res</code> response. This object will be created by 
the OpenID server, added to the <code>id_res</code> response object, and 
then extracted from the <code>id_res</code> message by the Consumer.
<hr/>


<!-- =========== START OF METHOD SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
  <th colspan="2">Method Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="__init__"></a><span class="summary-sig"><span class="summary-sig-name">__init__</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>data</span>,
          <span class=summary-sig-arg>sreg_ns_uri</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="__contains__"></a><span class="summary-sig"><span class="summary-sig-name">__contains__</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>field_name</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="__nonzero__"></a><span class="summary-sig"><span class="summary-sig-name">__nonzero__</span>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="openid.extensions.sreg.SRegResponse-class.html#getExtensionArgs" class="summary-sig-name"><code>getExtensionArgs</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
Get the fields to put in the simple registration namespace when adding 
them to an id_res message.</td></tr>
  <tr><td colspan="2">
    <b>Inherited from <a href="openid.extension.Extension-class.html"><code>Extension</code></a>:</b>
      <a href="openid.extension.Extension-class.html#toMessage"><code>toMessage</code></a>
      <br />
    <b>Inherited from <a href="__builtin__.object-class.html"><code>object</code></a>:</b>
      <a href="__builtin__.object-class.html#__delattr__"><code>__delattr__</code></a>, 
      <a href="__builtin__.object-class.html#__getattribute__"><code>__getattribute__</code></a>, 
      <a href="__builtin__.object-class.html#__hash__"><code>__hash__</code></a>, 
      <a href="__builtin__.object-class.html#__new__"><code>__new__</code></a>, 
      <a href="__builtin__.object-class.html#__reduce__"><code>__reduce__</code></a>, 
      <a href="__builtin__.object-class.html#__reduce_ex__"><code>__reduce_ex__</code></a>, 
      <a href="__builtin__.object-class.html#__repr__"><code>__repr__</code></a>, 
      <a href="__builtin__.object-class.html#__setattr__"><code>__setattr__</code></a>, 
      <a href="__builtin__.object-class.html#__str__"><code>__str__</code></a>
    </td></tr>
<tr bgcolor="#e8f0f8" class="group">
  <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Server</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">        SRegResponse
</font></td>
  <td><code><span class="summary-sig"><a href="openid.extensions.sreg.SRegResponse-class.html#extractResponse" class="summary-sig-name"><code>extractResponse</code></a>(<span class=summary-sig-arg>cls</span>,
          <span class=summary-sig-arg>request</span>,
          <span class=summary-sig-arg>data</span>)</span></code>
<br />
Take a <code><a href="openid.extensions.sreg.SRegRequest-class.html" 
class="link"><code>SRegRequest</code></a></code> and a dictionary of 
simple registration values and create a <code><a 
href="openid.extensions.sreg.SRegResponse-class.html" 
class="link"><code>SRegResponse</code></a></code> object containing that 
data.    <i>(Class method)</i>
</td></tr>
<tr bgcolor="#e8f0f8" class="group">
  <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Consumer</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">        SRegResponse
</font></td>
  <td><code><span class="summary-sig"><a href="openid.extensions.sreg.SRegResponse-class.html#fromSuccessResponse" class="summary-sig-name"><code>fromSuccessResponse</code></a>(<span class=summary-sig-arg>cls</span>,
          <span class=summary-sig-arg>success_response</span>,
          <span class=summary-sig-arg>signed_only</span>)</span></code>
<br />
Create a <code><a 
href="openid.extensions.sreg.SRegResponse-class.html" 
class="link"><code>SRegResponse</code></a></code> object from a 
successful OpenID library response (<code><a 
href="openid.consumer.consumer.SuccessResponse-class.html" 
class="link"><code>openid.consumer.consumer.SuccessResponse</code></a></code>) 
response message    <i>(Class method)</i>
</td></tr>
<tr bgcolor="#e8f0f8" class="group">
  <th colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;Read-only dictionary interface</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="keys"></a><span class="summary-sig"><span class="summary-sig-name">keys</span>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="iterkeys"></a><span class="summary-sig"><span class="summary-sig-name">iterkeys</span>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="openid.extensions.sreg.SRegResponse-class.html#items" class="summary-sig-name"><code>items</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
All of the data values in this simple registration response</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="iteritems"></a><span class="summary-sig"><span class="summary-sig-name">iteritems</span>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="__iter__"></a><span class="summary-sig"><span class="summary-sig-name">__iter__</span>(<span class=summary-sig-arg>self</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="openid.extensions.sreg.SRegResponse-class.html#get" class="summary-sig-name"><code>get</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>field_name</span>,
          <span class=summary-sig-arg>default</span>)</span></code>
<br />
Like dict.get, except that it checks that the field name is defined by 
the simple registration specification</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="__getitem__"></a><span class="summary-sig"><span class="summary-sig-name">__getitem__</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>field_name</span>)</span></code>
</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><a name="has_key"></a><span class="summary-sig"><span class="summary-sig-name">has_key</span>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>key</span>)</span></code>
</td></tr>
</table><br />


<!-- =========== START OF INSTANCE VARIABLE SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
  <th colspan="2">Instance Variable Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
<td><b><a href="openid.extensions.sreg.SRegResponse-class.html#data"><code>data</code></a></b>: The simple registration data, keyed by the unqualified simple 
registration name of the field (i.e.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
<td><b><a href="openid.extensions.sreg.SRegResponse-class.html#ns_uri"><code>ns_uri</code></a></b>: The URI under which the simple registration data was stored in the 
response message.</td></tr>
</table><br />


<!-- =========== START OF CLASS VARIABLE SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
  <th colspan="2">Class Variable Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1"><code>str</code></font></td>
<td><b><a href="openid.extensions.sreg.SRegResponse-class.html#ns_alias"><code>ns_alias</code></a></b> = <span title="'sreg'"><code><span class="variable-quote">'</span>sreg<span class="variable-quote">'</span>                                        </code>
</span></td></tr>
</table><br />


<!-- =========== START OF INSTANCE METHOD DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
  <th colspan="2">Instance Method Details</th></tr>
</table>

<a name="items"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">items</span>(<span class=sig-arg>self</span>)</span>
  </h3>
  All of the data values in this simple registration response
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="get"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">get</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>field_name</span>,
          <span class=sig-arg>default</span>=<span class=sig-default>None</span>)</span>
  </h3>
  Like dict.get, except that it checks that the field name is defined 
  by the simple registration specification
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="getExtensionArgs"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">getExtensionArgs</span>(<span class=sig-arg>self</span>)</span>
  </h3>
  Get the fields to put in the simple registration namespace when 
  adding them to an id_res message.
  <dl><dt></dt><dd>
    <dl><dt><b>Overrides:</b></dt>
      <dd><a href="openid.extension.Extension-class.html#getExtensionArgs"><code>openid.extension.Extension.getExtensionArgs</code></a></dd>
    </dl>
<p><b>See Also:</b> openid.extension
</p>

  </dd></dl>
</td></tr></table>
<br />


<!-- =========== START OF CLASS METHOD DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
  <th colspan="2">Class Method Details</th></tr>
</table>

<a name="extractResponse"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">extractResponse</span>(<span class=sig-arg>cls</span>,
          <span class=sig-arg>request</span>,
          <span class=sig-arg>data</span>)</span>
  </h3>
  Take a <code><a href="openid.extensions.sreg.SRegRequest-class.html" 
  class="link"><code>SRegRequest</code></a></code> and a dictionary of 
  simple registration values and create a <code><a 
  href="openid.extensions.sreg.SRegResponse-class.html" 
  class="link"><code>SRegResponse</code></a></code> object containing 
  that data.
  <dl><dt></dt><dd>
    <dl><dt><b>Parameters:</b></dt>
      <dd><code><b>request</b></code> -
         The simple registration request object
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=SRegRequest)</i>
      <dd><code><b>data</b></code> -
         The simple registration data for this response, as a 
        dictionary from unqualified simple registration field name to 
        string (unicode) value. For instance, the nickname should be 
        stored under the key 'nickname'.
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type={str:str})</i>
      </dd>
    </dl>
    <dl><dt><b>Returns:</b></dt>
      <dd>
        a simple registration response object
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=SRegResponse)</i>
      </dd>
    </dl>
  </dd></dl>
</td></tr></table>

<a name="fromSuccessResponse"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">fromSuccessResponse</span>(<span class=sig-arg>cls</span>,
          <span class=sig-arg>success_response</span>,
          <span class=sig-arg>signed_only</span>=<span class=sig-default>True</span>)</span>
  </h3>
  Create a <code><a 
  href="openid.extensions.sreg.SRegResponse-class.html" 
  class="link"><code>SRegResponse</code></a></code> object from a 
  successful OpenID library response (<code><a 
  href="openid.consumer.consumer.SuccessResponse-class.html" 
  class="link"><code>openid.consumer.consumer.SuccessResponse</code></a></code>) 
  response message
  <dl><dt></dt><dd>
    <dl><dt><b>Parameters:</b></dt>
      <dd><code><b>success_response</b></code> -
         A SuccessResponse from consumer.complete()
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=<code><a 
              href="openid.consumer.consumer.SuccessResponse-class.html" 
              class="link"><code>openid.consumer.consumer.SuccessResponse</code></a></code>)</i>
      <dd><code><b>signed_only</b></code> -
         Whether to process only data that was signed in the id_res 
        message from the server.
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=bool)</i>
      </dd>
    </dl>
    <dl><dt><b>Returns:</b></dt>
      <dd>
        A simple registration response containing the data that was 
        supplied with the <code>id_res</code> response.
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=SRegResponse)</i>
      </dd>
    </dl>
  </dd></dl>
</td></tr></table>
<br />


<!-- =========== START OF INSTANCE VARIABLE DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
  <th colspan="2">Instance Variable Details</th></tr>
</table>
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
<a name="data"></a>
<h3>data</h3>
The simple registration data, keyed by the unqualified simple 
registration name of the field (i.e. nickname is keyed by 
<code>'nickname'</code>)
</td></tr></table>
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
<a name="ns_uri"></a>
<h3>ns_uri</h3>
The URI under which the simple registration data was stored in the 
response message.
</td></tr></table>
<br />


<!-- =========== START OF CLASS VARIABLE DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
  <th colspan="2">Class Variable Details</th></tr>
</table>
<table width="100%" class="var-details" bgcolor="#e0e0e0"><tr><td>
<a name="ns_alias"></a>
<h3>ns_alias</h3>
<dl>
  <dt></dt>
  <dd>
    <dl>
      <dt><b>Type:</b></dt>
      <dd>
          <code>str</code>

      </dd>
<span title="'sreg'">      <dt><b>Value:</b></dt>
      <dd><table><tr><td>
<pre class="variable">
<span class="variable-quote">'</span>sreg<span class="variable-quote">'</span>                                                                 </pre>
        </td></tr></table></dd>
</span>    </dl>
  </dd>
</dl></td></tr></table>
<br />


<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="openid-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://openidenabled.com/python-openid/">Python-OpenID</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri Dec 14 16:10:52 2007</font></td>
    <td align="right"><a href="http://epydoc.sourceforge.net"
                      ><font size="-2">http://epydoc.sf.net</font></a></td>
  </tr>
</table>
</body>
</html>
